package com.app.oasystem.service;


import com.app.oasystem.dto.PageGridDto;
import com.app.oasystem.entity.Leaves;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 86+
 * @data 2021-04-13
 */
public interface LeavesService extends IService<Leaves> {
    /**
     * 根据Leaves的id获取当前对象
     * @param id
     * @return Leaves
     */
    Leaves getLeavesInfoById(Integer id);

    /**
     * 审批
     * @param id       记录id
     * @param leaveId  结果
     * @return
     */
    boolean approval(Integer id,Integer leaveId);

    /**
     * 根据Leaves的名称获取当前对象
     * @param leavesName
     * @return Leaves
     */
    Leaves getLeavesInfoByName(String leavesName);

    /**
     * 修改
     * @param leaves
     * @return  true代表更新成功  false代表更新失败
     */
    boolean updateLeaves(Leaves leaves);

    /**
     * 新增
     * @param leaves
     * @return true代表新增成功  false代表新增失败
     */
    boolean insertLeaves(Leaves leaves);

    /**
     * 删除
     * @param leaves
     * @return true代表删除成功  false代表删除失败
     */
    boolean deleteLeaves(Leaves leaves);

    /**
     * 分页查询
     * @param pageGridDto 分页辅助类
     * @return  Page<Leaves>
     */
    Object getLeavesList(PageGridDto pageGridDto);
}
